package javagprssrv.Task;

import javagprssrv.Common.Commands;
import javagprssrv.JGS_Param;

public class TrdGuanLi extends java.lang.Thread
{

    public TrdGuanLi() {
        super("TrdGuanLi");
    }
    
    @java.lang.Override
    public void run() {
        try
        {
          while (true)
          {
            Thread.sleep(1000L);
            

            do_ApplicationReset();
          }
        }
        catch (Exception e) {}
    }
    
    private void do_ApplicationReset() {
        final java.lang.String sysAutoResetTime = javagprssrv.JGS_Param.AutoReset_Time;
        final java.lang.String sysAutoReset = javagprssrv.JGS_Param.AutoReset;
        if (!sysAutoReset.equals("1")) {
            return;
        }
        java.lang.String date = new javagprssrv.Common.DateTime().getDateTime("YYYY-MM-DD HH:NN:SS");
        date = date.substring(11, 16);
        if (date.equals(sysAutoResetTime)) {
            new javagprssrv.Common.Commands().Do_ExtendCommands("Z_APPLICATION_RESET_Z");
        }
    }
}
